package wyp.library.ui.activity;

import wyp.library.tools.WypLog;
import android.os.Bundle;
import android.support.v4.app.FragmentActivity;

public class WypLogActivity extends FragmentActivity {
	
	protected boolean isShowLog() {
		return false;
	}

	public String getTag() {
		return getClass().getSimpleName();
	}

	@Override
	public void onCreate(Bundle savedInstanceState) {
		if (isShowLog()) {
			WypLog.e(getTag(), "--onCreate");
		}
		super.onCreate(savedInstanceState);
	}

	@Override
	protected void onStart() {
		if (isShowLog()) {
			WypLog.e(getTag(), "--onStart");
		}
		super.onStart();
	}

	@Override
	protected void onRestart() {
		if (isShowLog()) {
			WypLog.e(getTag(), "--onRestart");
		}
		super.onRestart();
	}

	@Override
	protected void onResume() {
		if (isShowLog()) {
			WypLog.e(getTag(), "--onResume");
		}
		super.onResume();
	}

	@Override
	protected void onPause() {
		if (isShowLog()) {
			WypLog.e(getTag(), "--onPause");
		}
		super.onPause();
	}

	@Override
	protected void onStop() {
		if (isShowLog()) {
			WypLog.e(getTag(), "--onStop");
		}
		super.onStop();
	}

	@Override
	protected void onDestroy() {
		if (isShowLog()) {
			WypLog.e(getTag(), "--onDestroy");
		}
		super.onDestroy();
	}
}
